home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17266 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.7 KB

  1. Path: news.cc.uic.edu!icarus!dhanle2
  2. From: dhanle2@icarus.cc.uic.edu (David James Hanley)
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Followup-To: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  6. Date: 14 Apr 1996 23:05:44 GMT
  7. Organization: University of Illinois at Chicago
  8. Message-ID: <4ks0c8$jte@piglet.cc.uic.edu>
  9. References: <31683229.446B9B3D@bbn.com> <DpJs8I.8tn@research.att.com> <4kn3c4$1ggc@piglet.cc.uic.edu> <Dpt0FD.Et4@research.att.com>
  10. NNTP-Posting-Host: icarus.cc.uic.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Andrew Koenig (ark@research.att.com) wrote:
  14. : In article <4kn3c4$1ggc@piglet.cc.uic.edu> dhanle2@icarus.cc.uic.edu (David James Hanley) writes:
  15. : > andrek koenig wrote:
  16.  
  17. : Is your transformation of my name supposed to be clever?
  18. : To make you feel like a better, more noble person?
  19. : To make your arguments more intellectually compelling?
  20. : To show the world that you enjoy insulting strangers?
  21.  
  22.     No, actually, when I was trimming the post, I accidentally 
  23. clipped off your name, and made a typo when I typed it back in.  
  24. I realize that mistyping your name is a mortal sin to the god of c++,
  25. even if he projects his like for flaming strangers onto others.
  26.  
  27. : > : The thing about hurling expletives around like that
  28. : > : is that it's so embarrassing when you're wrong -- as
  29. : > : you are in this case.
  30.  
  31. : >     Or that he is correct, as he is in this case.
  32.  
  33. : Correct about what?  That having a name-mangling standard for C++
  34. : would make C++ libraries easier to handle.  Sorry, but he's wrong,
  35. : and so are you.
  36.  
  37.     Nope. You're the one who is wrong here.  But seeing as you
  38. replied to my first post about the matter with insults to me, I really
  39. doubt you are interested in serious exploration of the matter.  But
  40. hurling childish insults.
  41.  
  42. : Name mangling, that is, the conventions that a compiler uses
  43. : in translating names from the source program into names
  44. : that the linker sees, is only one of a large number of things
  45. : that must be agreed before programs compiled with one compiler
  46. : can be linked with programs compiled with another.
  47.  
  48.     Sure.  No one is saying anything different.  Name mangling
  49. if only one of the obstacles to be overcome.  But many of these other
  50. obstacles have been overcome on other platforms already.  It appears to
  51. be somewhat stupid to make yet more obstacles by failing to standardize
  52. something as simple as name mangling.
  53.  
  54. :  If some
  55. : of those things are made compatible and not others, that can
  56. : easily make the problems worse instead of better.
  57.  
  58.     How can it be worse than not working at all?  
  59.  
  60. :  The reason
  61. : is that programs may appear to work compatibly when in fact
  62. : they are working only by accident.
  63.  
  64.     Remind me to throw away all of my C programs in that case--they
  65. a are all linked with a library compiled on a different compiler, 
  66. and are therefore broken.  Pity.
  67.  
  68. : Well, good for you.  That still does not gainsay the fact that
  69. : handing the same names to the linker does not make compilers
  70. : compatible.
  71.  
  72.     No, and again, no one said it did.  But a lot of work has been
  73. done to allow link-compatibility within C libraries.  It seems foolish
  74. to throw this all away.
  75.  
  76. : > : Getting a single binary library to work with both those
  77. : > : C compilers is no easier than it is in C++.
  78.  
  79. : >     Wrong.  As evidence, we do this all the time in C,
  80. : > but I've never seen it done in C++. 
  81.  
  82. : I completely agree with you that link compatibility between C++
  83. : compilers is more difficult to achieve, hence less common, than
  84. : link compatibility between C compilers.
  85.  
  86.     Whups!  A few lines above you said it was no easier!
  87.  
  88. : But agreeing on a standard for name mangling would not solve that
  89. : problem, because it is vanishingly rare that two C++ compilers are
  90. : binary compatible in all details except for names.
  91.  
  92.     Right.  Since the name mangling is unspecified, why stick to the
  93. standard techniques for the platform?  We can squeeze out another 5% of
  94. performance by passing the first paramater as a register( or whatever ).
  95. Binary incompatibility between compilers is a serious problem, for sharing
  96. of libraries, and other such activities, and it sure would help things
  97. if the committee could have put it in the standard, removing yet one
  98. more problem.  I mean, they added literal "and" and "or" for bob's sake.
  99.  
  100. --
  101. ------------------------------------------------------------------------------
  102. David Hanley,                 |______     Computer Science graduate student.  
  103. dhanley@lac.eecs.uic.edu      |\ ___/__  Martial Artist. Biker. Chess Freak   
  104. www_lac.eecs.uic.edu/~dhanley/| \\ /  / Libertarian.  Atheist.  Bisexual.     
  105. My employer barely KNOWS me.  |  \/BI/ Aspiring novelist.Joyce Kafka Neitzchie
  106. -----------------------------------\/-----------------------------------------
  107. Hemlock? I never touch the stuff!
  108.